package com.rom.ratethehell.protocol.tasks;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import com.rom.ratethehell.protocol.RequestOrganizer;
import com.rom.ratethehell.protocol.Thumbnail;

import android.content.Context;
import android.net.Uri;

public abstract class SendImageTask extends SneakAPicTask<ArrayList<Thumbnail>>{


	private Uri data;
	private Context context;

	public SendImageTask(Context context,Uri data) {
		super(context,true);
		this.data = data; 
		this.context = context;
	}

	@Override
	protected void doTask() throws Exception {
		InputStream openInputStream = context.getContentResolver().openInputStream(data);
		setResult(RequestOrganizer.getInstance().sendImage(openInputStream));
	}



}
